<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>组件绑定class</title>
<!--引入Vue库-->
<script src="vue.js"></script>
<style>
  .style1 {
    font-size: 20px;
    font-weight: bold; 
  }
  .style2 {
    color: blue;
  }
 .style3 {
    font-size: 24px;
    font-weight: bold; 
  }
  .style4 {
    color: red;
  }
</style>
</head>
<body>
<div id="app" class="test">
   <my-component class="style1 style2"></my-component>
</div>
<script>
Vue.component('my-component', {
  template: '<p class="style3 style4">欢迎登录</p>'
})
var app = new Vue({
  el: '#app'
})
</script>

</body>
</html>
